# 整数的二进制相加
def transfer (num):
  res = bin(num)[2:]
  if len(res) < 8:
    sup = []
    for i in range(8-len(res)):
      sup.append('0')
    res = ''.join(sup) + res
  return res

a = int(input())
b = int(input())

print(transfer(a))
print(transfer(b))
print('--------')
print(transfer(a+b))
